﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="Client.Theme.MyTheme" >
	<ResourceDictionary.MergedDictionaries>
		<ResourceDictionary Source="GlossyControl.xaml"/>
	</ResourceDictionary.MergedDictionaries>
    <Style TargetType="{x:Type TextBlock}" >
        <Setter Property="Foreground" Value="#FFFFFFFF" />
    </Style>
    <DrawingBrush x:Key="BlackGlossy_RadialBG">
        <DrawingBrush.Drawing>
            <DrawingGroup>
                <GeometryDrawing>
                    <GeometryDrawing.Brush>
                        <RadialGradientBrush Center="0.54326,0.45465" RadiusX="0.602049" RadiusY="1.02049" GradientOrigin="0.4326,0.45465">
                            <GradientStop Color="#8a8a8a" Offset="0"/>
                            <GradientStop Color="#242424" Offset="0.718518495559692"/>
                            <GradientStop Color="#000000" Offset="1"/>
                        </RadialGradientBrush>
                    </GeometryDrawing.Brush>
                    <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0 1,1" />
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
                <GeometryDrawing>
                    <GeometryDrawing.Brush>
                        <LinearGradientBrush StartPoint="0,0" EndPoint="0,1" SpreadMethod="Pad">
                            <GradientStop Color="#FFFFFFFF" Offset="0"/>
                            <GradientStop Color="#22FFFFFF" Offset="1"/>
                        </LinearGradientBrush>
                    </GeometryDrawing.Brush>
                    <GeometryDrawing.Geometry>
                        <RectangleGeometry Rect="0,0 1,0.48" />
                    </GeometryDrawing.Geometry>
                </GeometryDrawing>
            </DrawingGroup>
        </DrawingBrush.Drawing>
    </DrawingBrush>

	<Style x:Key="MyWindowLite" TargetType="{x:Type Window}">
		<Setter Property="Margin" Value="5" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="WindowStyle" Value="None" />
		<Setter Property="AllowsTransparency" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Window}">
                    <Border CornerRadius="5" BorderThickness="3" Background="{StaticResource GlossyBlack_BackgroundGradient}" BorderBrush="{DynamicResource MyWindowBorder}">
						<Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <AdornerDecorator Grid.Row="1">
                                <ContentPresenter Content="{TemplateBinding Content}" Grid.Row="1" Margin="{TemplateBinding Margin}" />
                            </AdornerDecorator>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
	</Style>
	
    <Style x:Key="MyWindow" TargetType="{x:Type Window}">
        <Setter Property="Margin" Value="5" />
        <Setter Property="ResizeMode" Value="NoResize" />
        <Setter Property="WindowStyle" Value="None" />
		<Setter Property="AllowsTransparency" Value="True" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Window}">
                    <Border CornerRadius="5" BorderThickness="3" Background="{StaticResource GlossyBlack_BackgroundGradient}" BorderBrush="{DynamicResource MyWindowBorder}">
						<Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="30"  />
                                <RowDefinition />
                            </Grid.RowDefinitions>
                            <Grid Grid.Row="0" 
							Background="{StaticResource GlossyBlack_GlossGradient}" 
							MouseLeftButtonDown="titleBar_MouseLeftButtonDown">
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition />
                                    <ColumnDefinition Width="40" />
                                </Grid.ColumnDefinitions>
                                <Label Style="{DynamicResource MyWindowTitle}" Content="{TemplateBinding Title}" VerticalAlignment="Center" />
                                <Button Grid.Column="1" Name="btnClose" HorizontalAlignment="Left" 
										Width="35" Content="X" FontWeight="Bold" FontSize="12" 
										Background="{x:Null}" Foreground="#FFFFFFFF" Height="23" 
										VerticalAlignment="Center" Click="btnClose_Click"/>
                            </Grid>
                            <AdornerDecorator Grid.Row="1">
                                <ContentPresenter Content="{TemplateBinding Content}" Grid.Row="1" Margin="{TemplateBinding Margin}" />
                            </AdornerDecorator>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <LinearGradientBrush x:Key="MyWindowBG" EndPoint="0.5,1" StartPoint="0.5,0">
        <GradientStop Color="#FF030707" Offset="1"/>
        <GradientStop Color="#FF748787" Offset="0"/>
    </LinearGradientBrush>
    <SolidColorBrush x:Key="MyWindowBorder" Color="#FFD9D9D9"/>

    <Style x:Key="MyWindowTitle" TargetType="{x:Type Label}" >
        <Setter Property="Foreground" Value="#FFFFFF" />
    </Style>
	
	<!-- TextColour -->
	<Style x:Key="WhiteText" TargetType="{x:Type TextBlock}">
		<Setter Property="Foreground" Value="#FFFFFF" />
	</Style>
</ResourceDictionary>